#ifndef SHADERS_H_
#define SHADERS_H_

#include <vector>
#include <string>
using namespace std;

#include <GL/glew.h>
#include <GL/gl.h>

//

enum AttribLocation {VERTEX_ATTRIB_LOCATION = 0, TEXCOORD_ATTRIB_LOCATION = 1, NORMAL_ATTRIB_LOCATION = 2}; //for vbo in shaders

//

class ShaderProgram
{
	private:
		vector<GLuint> Shaders;

		vector<float*> UniformsVec3;
		vector<GLint> UniformLocationsVec3;

		GLuint uProgram;
	public:
        ShaderProgram();

		int AddShader(GLenum Type);

		void LoadShader(int nIndex, string sFileName);
		void AttachShader(int nIndex);
		void Link();

		void SetMatrix4(const char *chName, float fvMatrix[16]);
		void SetTexture(const char *chName, GLint nTexture, int nUnitNumber);
		void SetVector3(const char *chName, float fvVector[3]);

		int AddVector3(const char *chName, float *fvVector);

		void DelVector3(int nIndex);

		void Use(bool bUse);
};

#endif
